<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"
    import="beans.EventBean" %>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Bootstrap, from Twitter</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="css/bootstrap.css" rel="stylesheet">
    <style type="text/css">
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
      #sexyline { 
          margin: 25px 0;
          height: 1px;
          background: #eeeee;
          background: -webkit-gradient(linear, 0 0, 100% 0, from(white), to(white), color-stop(50%, grey));
      }​
    </style>
    <link href="css/bootstrap-responsive.css" rel="stylesheet">

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    
    <!--Custom JS scripts-->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script>
    <script type="text/javascript" src="js/bday-picker.js"></script>
    <script type="text/javascript" src="js/countryCity.js"></script>
    <script type="text/javascript" src="js/ambitType.js"></script>
    <script type="text/javascript" src="js/recentVenues.js"></script>
    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="ico/apple-touch-icon-57-precomposed.png">
  </head>

  <body>

    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a class="brand" href="#">drop.in</a>
          <div class="nav-collapse">
            <ul class="nav">
              <li class="active"><a href="#">Home</a></li>
              <li><a href="#about">About</a></li>
              <li><a href="#contact">Contact</a></li>
            </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>

    <div class="container">

      <!-- Main hero unit for a primary marketing message or call to action -->
      <%    EventBean editingEvent = (EventBean)session.getAttribute("currentEvent");	
            Boolean edit = false;	
            if (session.getAttribute("editing") != null) 
            		edit = (Boolean)session.getAttribute("editing"); %>
      <div class="hero-unit" style="padding: 10px 10px 10px 10px;">
        <div style="text-align: center;">
          <h2><% if (edit) out.print("Edit details for event '" + editingEvent.getName() + "'"); else out.print("Event Creation Panel"); %></h2>
        </div>
      </div>
      <div class="row">
        <div class="span4 offset3">
        <form class="form-horizontal" method="post" action="EventCreationServlet">
          <fieldset>
            <legend>Enter event details:</legend>
            <% if (session.getAttribute("eventcreationfail") != null) out.print("<div class='alert alert-error'>" + (String)session.getAttribute("eventcreationfail") + "</div>"); %>
            <div class="control-group" style="padding-right: 80px;;">
              <label class="control-label" for="title">Event Title:</label>
              <div class="controls">
                <input type="text" class="input-xlarge" id="title" name="title" required size="32" placeholder="The title of the event" <% if (edit) out.print("value='"+ editingEvent.getName() + "'"); %>>
                <p class="help-block"> </p>
              </div>
              <label class="control-label" for="eventdate">Event Date:</label>
              <div class="controls" id="eventdate">
                <select name="day" id="day" class="span1">
                  <option disabled="" <% if (!edit) out.print("selected"); %>>Day</option>
                  <option value="01" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("01")) out.print("selected"); %>>1</option>
                  <option value="02" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("02")) out.print("selected"); %>>2</option>
                  <option value="03" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("03")) out.print("selected"); %>>3</option>
                  <option value="04" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("04")) out.print("selected"); %>>4</option>
                  <option value="05" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("05")) out.print("selected"); %>>5</option>
                  <option value="06" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("06")) out.print("selected"); %>>6</option>
                  <option value="07" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("07")) out.print("selected"); %>>7</option>
                  <option value="08" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("08")) out.print("selected"); %>>8</option>
                  <option value="09" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("09")) out.print("selected"); %>>9</option>
                  <option value="10" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("10")) out.print("selected"); %>>10</option>
                  <option value="11" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("11")) out.print("selected"); %>>11</option>
                  <option value="12" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("12")) out.print("selected"); %>>12</option>
                  <option value="13" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("13")) out.print("selected"); %>>13</option>
                  <option value="14" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("14")) out.print("selected"); %>>14</option>
                  <option value="15" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("15")) out.print("selected"); %>>15</option>
                  <option value="16" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("16")) out.print("selected"); %>>16</option>
                  <option value="17" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("17")) out.print("selected"); %>>17</option>
                  <option value="18" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("18")) out.print("selected"); %>>18</option>
                  <option value="19" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("19")) out.print("selected"); %>>19</option>
                  <option value="20" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("20")) out.print("selected"); %>>20</option>
                  <option value="21" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("21")) out.print("selected"); %>>21</option>
                  <option value="22" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("22")) out.print("selected"); %>>22</option>
                  <option value="23" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("23")) out.print("selected"); %>>23</option>
                  <option value="24" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("24")) out.print("selected"); %>>24</option>
                  <option value="25" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("25")) out.print("selected"); %>>25</option>
                  <option value="26" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("26")) out.print("selected"); %>>26</option>
                  <option value="27" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("27")) out.print("selected"); %>>27</option>
                  <option value="28" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("28")) out.print("selected"); %>>28</option>
                  <option value="29" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("29")) out.print("selected"); %>>29</option>
                  <option value="30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("30")) out.print("selected"); %>>30</option>
                  <option value="31" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(8, 10).equals("31")) out.print("selected"); %>>31</option>
                </select>
                <select name="month" id="month" class="span2">
                  <option disabled="" <% if (!edit) out.print("selected"); %>>Month</option>
                  <option value="01" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(5, 7).equals("01")) out.print("selected"); %>>January</option>
                  <option value="02" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(5, 7).equals("02")) out.print("selected"); %>>February</option>
                  <option value="03" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(5, 7).equals("03")) out.print("selected"); %>>March</option>
                  <option value="04" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(5, 7).equals("04")) out.print("selected"); %>>April</option>
                  <option value="05" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(5, 7).equals("05")) out.print("selected"); %>>May</option>
                  <option value="06" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(5, 7).equals("06")) out.print("selected"); %>>June</option>
                  <option value="07" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(5, 7).equals("07")) out.print("selected"); %>>July</option>
                  <option value="08" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(5, 7).equals("08")) out.print("selected"); %>>August</option>
                  <option value="09" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(5, 7).equals("09")) out.print("selected"); %>>September</option>
                  <option value="10" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(5, 7).equals("10")) out.print("selected"); %>>October</option>
                  <option value="11" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(5, 7).equals("11")) out.print("selected"); %>>November</option>
                  <option value="12" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(5, 7).equals("12")) out.print("selected"); %>>December</option>
                </select>
                <select name="year" id="year" class="span1">
                  <option value="year" disabled="" <% if (!edit) out.print("selected"); %>>Year</option>
                  <option value="2012" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(0, 4).equals("2012")) out.print("selected"); %>>2012</option>
                  <option value="2013" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(0, 4).equals("2013")) out.print("selected"); %>>2013</option>
                  <option value="2014" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(0, 4).equals("2014")) out.print("selected"); %>>2014</option>
                  <option value="2015" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(0, 4).equals("2015")) out.print("selected"); %>>2015</option>
                </select>
                <p class="help-block"> </p>
              </div>
              <label class="control-label" for="starttime">Start Time:</label>
              <div class="controls" id="starttime">
                <select name="starttime" id="starttime" class="span2">
                  <option disabled="" <% if (!edit) out.print("selected"); %>>Start time</option>
                  		<option value="00:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>00:00</option>
                        <option value="00:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("00:30")) out.print("selected"); %>>00:30</option>
                        <option value="01:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("01:00")) out.print("selected"); %>>01:00</option>
                        <option value="01:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("01:30")) out.print("selected"); %>>01:30</option>
                        <option value="02:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("02:00")) out.print("selected"); %>>02:00</option>
                        <option value="02:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("02:30")) out.print("selected"); %>>02:30</option>
                        <option value="03:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("03:00")) out.print("selected"); %>>03:00</option>
                        <option value="03:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("03:30")) out.print("selected"); %>>03:30</option>
                        <option value="04:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("04:00")) out.print("selected"); %>>04:00</option>
                        <option value="04:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("04:30")) out.print("selected"); %>>04:30</option>
                        <option value="05:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("05:00")) out.print("selected"); %>>05:00</option>
                        <option value="05:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("05:30")) out.print("selected"); %>>05:30</option>
                        <option value="06:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("06:00")) out.print("selected"); %>>06:00</option>
                        <option value="06:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("06:30")) out.print("selected"); %>>06:30</option>
                        <option value="07:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("07:00")) out.print("selected"); %>>07:00</option>
                        <option value="07:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("07:30")) out.print("selected"); %>>07:30</option>
                        <option value="08:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("08:00")) out.print("selected"); %>>08:00</option>
                        <option value="08:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("08:30")) out.print("selected"); %>>08:30</option>
                        <option value="09:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("09:00")) out.print("selected"); %>>09:00</option>
                        <option value="09:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("09:30")) out.print("selected"); %>>09:30</option>
                        <option value="10:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("10:00")) out.print("selected"); %>>10:00</option>
                        <option value="10:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("10:30")) out.print("selected"); %>>10:30</option>
                        <option value="11:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("11:00")) out.print("selected"); %>>11:00</option>
                        <option value="11:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("11:30")) out.print("selected"); %>>11:30</option>
                        <option value="12:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("12:00")) out.print("selected"); %>>12:00</option>
                        <option value="12:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("12:30")) out.print("selected"); %>>12:30</option>
                        <option value="13:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("13:00")) out.print("selected"); %>>13:00</option>
                        <option value="13:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("13:30")) out.print("selected"); %>>13:30</option>
                        <option value="14:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("14:00")) out.print("selected"); %>>14:00</option>
                        <option value="14:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("14:30")) out.print("selected"); %>>14:30</option>
                        <option value="15:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("15:00")) out.print("selected"); %>>15:00</option>
                        <option value="15:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("15:30")) out.print("selected"); %>>15:30</option>
                        <option value="16:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("16:00")) out.print("selected"); %>>16:00</option>
                        <option value="16:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("16:30")) out.print("selected"); %>>16:30</option>
                        <option value="17:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("17:00")) out.print("selected"); %>>17:00</option>
                        <option value="17:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("17:30")) out.print("selected"); %>>17:30</option>
                        <option value="18:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("18:00")) out.print("selected"); %>>18:00</option>
                        <option value="18:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("18:30")) out.print("selected"); %>>18:30</option>
                        <option value="19:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("19:00")) out.print("selected"); %>>19:00</option>
                        <option value="19:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("19:30")) out.print("selected"); %>>19:30</option>
                        <option value="20:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("20:00")) out.print("selected"); %>>20:00</option>
                        <option value="20:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("20:30")) out.print("selected"); %>>20:30</option>
                        <option value="21:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("21:00")) out.print("selected"); %>>21:00</option>
                        <option value="21:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("21:30")) out.print("selected"); %>>21:30</option>
                        <option value="22:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("22:00")) out.print("selected"); %>>22:00</option>
                        <option value="22:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("22:30")) out.print("selected"); %>>22:30</option>
                        <option value="23:00" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("23:00")) out.print("selected"); %>>23:00</option>
                        <option value="23:30" <% if (edit && editingEvent.getStartTimeStamp().toString().substring(11, 16).equals("23:30")) out.print("selected"); %>>23:30</option> 
                  </select>
                <p class="help-block"> </p>
              </div>
              <label class="control-label" for="endtime">End Time:</label>
              <div class="controls" id="endtime">
                <select name="endtime" id="endtime" class="span2">
                  <option disabled="" <% if (!edit) out.print("selected"); %>>End time</option>
                  		<option value="00:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>00:00</option>
                        <option value="00:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>00:30</option>
                        <option value="01:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>01:00</option>
                        <option value="01:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>01:30</option>
                        <option value="02:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>02:00</option>
                        <option value="02:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>02:30</option>
                        <option value="03:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>03:00</option>
                        <option value="03:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>03:30</option>
                        <option value="04:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>04:00</option>
                        <option value="04:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>04:30</option>
                        <option value="05:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>05:00</option>
                        <option value="05:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>05:30</option>
                        <option value="06:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>06:00</option>
                        <option value="06:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>06:30</option>
                        <option value="07:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>07:00</option>
                        <option value="07:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>07:30</option>
                        <option value="08:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>08:00</option>
                        <option value="08:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>08:30</option>
                        <option value="09:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>09:00</option>
                        <option value="09:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>09:30</option>
                        <option value="10:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>10:00</option>
                        <option value="10:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>10:30</option>
                        <option value="11:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>11:00</option>
                        <option value="11:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>11:30</option>
                        <option value="12:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>12:00</option>
                        <option value="12:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>12:30</option>
                        <option value="13:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>13:00</option>
                        <option value="13:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>13:30</option>
                        <option value="14:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>14:00</option>
                        <option value="14:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>14:30</option>
                        <option value="15:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>15:00</option>
                        <option value="15:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>15:30</option>
                        <option value="16:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>16:00</option>
                        <option value="16:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>16:30</option>
                        <option value="17:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>17:00</option>
                        <option value="17:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>17:30</option>
                        <option value="18:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>18:00</option>
                        <option value="18:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>18:30</option>
                        <option value="19:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>19:00</option>
                        <option value="19:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>19:30</option>
                        <option value="20:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>20:00</option>
                        <option value="20:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>20:30</option>
                        <option value="21:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>21:00</option>
                        <option value="21:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>21:30</option>
                        <option value="22:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>22:00</option>
                        <option value="22:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>22:30</option>
                        <option value="23:00" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>23:00</option>
                        <option value="23:30" <% if (edit && editingEvent.getEndTimeStamp().toString().substring(11, 16).equals("00:00")) out.print("selected"); %>>23:30</option> 
                  </select>
                  <p class="help-block"></p>
              </div>
              <label class="control-label" for="venue">Venue:</label>
              <div class="controls">
              	<div class="input-append">
                <input type="text" class="input" id="venue" name="venue" required size="50" placeholder="The name of the venue" <% if (edit) out.print("value='" + editingEvent.getVenue().getName() + "'"); %>>
                <a id="tooltip" href="#VenueModal" class="add-on" data-toggle="modal" rel="tooltip" title="Select a recent venue" onClick="getVenues()"> ... </a></div>
                <p class="help-block"> </p>
              </div>
              <div class="modal hide" id="VenueModal" data-backdrop="static" data-keyboard="false">
  				<div class="modal-header">
    				<button type="button" class="close" data-dismiss="modal">×</button>
    				<h3>Recent Venues</h3>
  				</div>
 				<div class="modal-body">
  					  <div id="recentvenues"><p>Please wait…</p></div>
 			 	</div>
 			 	<div class="modal-footer">
    				<a href="#" class="btn btn-danger" data-dismiss="modal" onClick="clearVenue()">Clear</a>
  				</div>
			  </div>
			  <label class="control-label" for="venueid" style="display: none;">VenueID</label>
              <div class="controls">
                <input type="hidden" id="venueid" name="venueid" required pattern="[0-9][0-9]*$" size="50" value="0">
                <p class="help-block"> </p>
              </div>
              <label class="control-label" for="venue">Venue Address:</label>
              <div class="controls">
                <input type="text" class="input-xlarge" id="venueaddress" name="venueaddress" required size="50" placeholder="The address of the venue" <% if (edit) out.print("value='" + editingEvent.getVenue().getAddress() + "'"); %>>
                <p class="help-block"> </p>
              </div>
                <label class="control-label" for="country">Country:</label>
              <div class="controls">
                <select name="country" id="country" onchange="selRegion(this.value);">
                  <option disabled="" selected="">Select A Country</option>
                  <option value="Italy">Italy</option>
                  <option value="Portugal">Portugal</option>
                </select>
                <p class="help-block"> </p>
              </div>
              <label class="control-label" for="region">Region:</label>
              <div class="controls">
                <select name="region" id="region" onchange="selCity(this.value);">
                  <option disabled="" selected="">Please Select A Country First</option>
                </select>
                <p class="help-block"> </p>
              </div>
              <label class="control-label" for="city">City:</label>
              <div class="controls">
                <select name="city" id="city">
                  <option disabled="" selected="">Please Select A Region First</option>
                </select>
                <p class="help-block"> </p>
              </div>
            </div>
              <label class="control-label" for="ambit">Ambit:</label>
              <div class="controls">
                <select name="ambit" id="ambit" class="span2" onchange="selType(this.value);">
                  <option disabled="" selected="">Ambit</option>
                  <option value="Sports">Sports</option>
                  <option value="Traveling">Traveling</option>
                  <option value="Entertainment">Entertainment</option>
                </select>
              <p class="help-block"></p>
              </div>
              <label class="control-label" for="type">Type:</label>
              <div class="controls">
                <select name="type" id="type" class="span2">
                  <option disabled="" selected="">Please select an ambit first</option>
                </select>
              <p class="help-block"></p>
              </div>
              <label class="control-label" for="venue">Number of participants:</label>
              <div class="controls">
                <input type="text" class="input-xlarge" id="partnumber" name="partnumber" required pattern="[1-9][0-9]*" size="32" placeholder="The total number of participants" <% if (edit) out.print("value='"+ editingEvent.getParticipants() + "'"); %>>
                <p class="help-block"> </p>
              </div>
              <label class="control-label" for="venue">Number of guest spots:</label>
              <div class="controls">
                <input type="text" class="input-xlarge" id="guestnumber" name="guestnumber" required pattern="[1-9][0-9]*" size="32" placeholder="The number of open spots" <% if (edit) out.print("value='"+ editingEvent.getGuests() + "'"); %>>
                <p class="help-block"> </p>
              </div>
              <label class="control-label" for="venue">Event description:</label>
              <div class="controls">
               <textarea type="text" name="description" id="description" style="width: 100%;"cols="100" rows="5" required><% if (edit) out.print(editingEvent.getDescription()); %></textarea>
                <p class="help-block"> </p>
              </div>
            </div></div>
            <div class="form-actions" style="text-align: center;">
              <button type="submit" class="btn btn-primary"><% if (edit) out.print("Update Event Details"); else out.print("Create Event!"); %></button>
            </div>
            <div class="controls">
                <input type="hidden" id="editing" name="editing" required size="50" value="<% if (edit) out.print("yes"); else out.print("no"); %>">
                <p class="help-block"> </p>
              </div>
          </fieldset>
        </form>
   		</div></div>	
      <footer>
        <p style="text-align: center;">&copy; PiP 2012</p>
      </footer>

    </div> <!-- /container -->

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="js/bootstrap.js"></script>
    <script src="js/bootstrap-alert.js"></script>
    <script src="js/bootstrap-modal.js"></script>
    <script src="js/bootstrap-dropdown.js"></script>
    <script src="js/bootstrap-scrollspy.js"></script>
    <script src="js/bootstrap-tab.js"></script>
    <script src="js/bootstrap-tooltip.js"></script>
    <script src="js/bootstrap-popover.js"></script>
    <script src="js/bootstrap-button.js"></script>
    <script src="js/bootstrap-collapse.js"></script>
    <script src="js/bootstrap-carousel.js"></script>
    <script src="js/bootstrap-typeahead.js"></script>

  </body>
</html>
